

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>RGW Module &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="MDS Autoscaler Module" href="../mds_autoscaler/" />
    <link rel="prev" title="Rook" href="../rook/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../">Ceph 管理器守护进程</a></li>
      <li class="breadcrumb-item active">RGW Module</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../_sources/mgr/rgw.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 管理器守护进程</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../administrator/">安装和配置</a></li>
<li class="toctree-l2"><a class="reference internal" href="../modules/">模块编程</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestrator_modules/">编写 orchestrator 插件</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dashboard/">仪表盘模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ceph_api/">Ceph RESTful API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../alerts/">Alerts 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../diskprediction/">DiskPrediction 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../localpool/">localpool 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prometheus/">Prometheus 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../influx/">Influx 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../hello/">Hello 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../telegraf/">Telegraf 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../telemetry/">Telemetry 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../iostat/">Iostat 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../crash/">Crash 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../insights/">Insights 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestrator/">Orchestrator 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../rook/">Rook 模块</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">RGW 模块</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#enabling">Enabling</a></li>
<li class="toctree-l3"><a class="reference internal" href="#rgw-realm-operations">RGW Realm Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="#realm-credentials-token">Realm Credentials Token</a></li>
<li class="toctree-l3"><a class="reference internal" href="#commands">Commands</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../mds_autoscaler/">MDS Autoscaler 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../nfs/">NFS 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../smb/">SMB module</a></li>
<li class="toctree-l2"><a class="reference internal" href="../progress/">Progress 模块</a></li>
<li class="toctree-l2"><a class="reference internal" href="../cli_api/">CLI API 命令模块</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="rgw-module">
<span id="mgr-rgw-module"></span><h1>RGW Module<a class="headerlink" href="#rgw-module" title="Permalink to this heading"></a></h1>
<p>The rgw module provides a simple interface to deploy RGW multisite.
It helps with bootstrapping and configuring RGW realm, zonegroup and
the different related entities.</p>
<section id="enabling">
<h2>Enabling<a class="headerlink" href="#enabling" title="Permalink to this heading"></a></h2>
<p>The <em>rgw</em> module is enabled with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">mgr</span> <span class="n">module</span> <span class="n">enable</span> <span class="n">rgw</span>
</pre></div>
</div>
</section>
<section id="rgw-realm-operations">
<h2>RGW Realm Operations<a class="headerlink" href="#rgw-realm-operations" title="Permalink to this heading"></a></h2>
<p>Bootstrapping RGW realm creates a new RGW realm entity, a new zonegroup,
and a new zone. It configures a new system user that can be used for
multisite sync operations. Under the hood this module instructs the
orchestrator to create and deploy the corresponding RGW daemons. The module
supports both passing the arguments through the cmd line or as a spec file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><style type="text/css">
span.prompt1:before {
  content: "# ";
}
</style><span class="prompt1">ceph<span class="w"> </span>rgw<span class="w"> </span>realm<span class="w"> </span>bootstrap<span class="w"> </span><span class="o">[</span>--realm-name<span class="o">]</span><span class="w"> </span><span class="o">[</span>--zonegroup-name<span class="o">]</span><span class="w"> </span><span class="o">[</span>--zone-name<span class="o">]</span><span class="w"> </span><span class="o">[</span>--port<span class="o">]</span><span class="w"> </span><span class="o">[</span>--placement<span class="o">]</span><span class="w"> </span><span class="o">[</span>--start-radosgw<span class="o">]</span></span>
</pre></div></div><p>The command supports providing the configuration through a spec file (<cite>-i option</cite>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ceph<span class="w"> </span>rgw<span class="w"> </span>realm<span class="w"> </span>bootstrap<span class="w"> </span>-i<span class="w"> </span>myrgw.yaml</span>
</pre></div></div><p>Following is an example of RGW multisite spec file:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">rgw_realm</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myrealm</span>
<span class="nt">rgw_zonegroup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myzonegroup</span>
<span class="nt">rgw_zone</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myzone</span>
<span class="nt">placement</span><span class="p">:</span>
<span class="w">  </span><span class="nt">hosts</span><span class="p">:</span>
<span class="w">   </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ceph-node-1</span>
<span class="w">   </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ceph-node-2</span>
<span class="nt">spec</span><span class="p">:</span>
<span class="w">  </span><span class="nt">rgw_frontend_port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5500</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The spec file used by RGW has the same format as the one used by the orchestrator. Thus,
the user can provide any orchestration supported rgw parameters including advanced
configuration features such as SSL certificates etc.</p>
</div>
<p>Users can also specify custom zone endpoints in the spec (or through the cmd line). In this case, no
cephadm daemons will be launched. Following is an example RGW spec file with zone endpoints:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">rgw_realm</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myrealm</span>
<span class="nt">rgw_zonegroup</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myzonegroup</span>
<span class="nt">rgw_zone</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myzone</span>
<span class="nt">zone_endpoints</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://&lt;rgw_host1&gt;:&lt;rgw_port1&gt;, http://&lt;rgw_host2&gt;:&lt;rgw_port2&gt;</span>
</pre></div>
</div>
</section>
<section id="realm-credentials-token">
<h2>Realm Credentials Token<a class="headerlink" href="#realm-credentials-token" title="Permalink to this heading"></a></h2>
<p>Users can list the available tokens for the created (or already existing) realms.
The token is a base64 string that encapsulates the realm information and its
master zone endpoint authentication data. Following is an example of
the <cite>ceph rgw realm tokens</cite> output:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ceph<span class="w"> </span>rgw<span class="w"> </span>realm<span class="w"> </span>tokens<span class="w"> </span><span class="p">|</span><span class="w"> </span>jq</span>
</pre></div></div><div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="w">  </span><span class="p">{</span>
<span class="w">    </span><span class="nt">&quot;realm&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;myrealm1&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;token&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;ewogICAgInJlYWxtX25hbWUiOiAibXlyZWFs....NHlBTFhoIgp9&quot;</span>
<span class="w">  </span><span class="p">},</span>
<span class="w">  </span><span class="p">{</span>
<span class="w">    </span><span class="nt">&quot;realm&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;myrealm2&quot;</span><span class="p">,</span>
<span class="w">    </span><span class="nt">&quot;token&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;ewogICAgInJlYWxtX25hbWUiOiAibXlyZWFs....RUU12ZDB0Igp9&quot;</span>
<span class="w">  </span><span class="p">}</span>
<span class="p">]</span>
</pre></div>
</div>
<p>User can use the token to pull a realm to create secondary zone on a
different cluster that syncs with the master zone on the primary cluster
by using <cite>ceph rgw zone create</cite> command and providing the corresponding token.</p>
<p>Following is an example of zone spec file:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">rgw_zone</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-secondary-zone</span>
<span class="nt">rgw_realm_token</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">&lt;token&gt;</span>
<span class="nt">placement</span><span class="p">:</span>
<span class="w">  </span><span class="nt">hosts</span><span class="p">:</span>
<span class="w">   </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ceph-node-1</span>
<span class="w">   </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ceph-node-2</span>
<span class="nt">spec</span><span class="p">:</span>
<span class="w">  </span><span class="nt">rgw_frontend_port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5500</span>
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ceph<span class="w"> </span>rgw<span class="w"> </span>zone<span class="w"> </span>create<span class="w"> </span>-i<span class="w"> </span>zone-spec.yaml</span>
</pre></div></div><div class="admonition note">
<p class="admonition-title">Note</p>
<p>The spec file used by RGW has the same format as the one used by the orchestrator. Thus,
the user can provide any orchestration supported rgw parameters including advanced
configuration features such as SSL certificates etc.</p>
</div>
</section>
<section id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this heading"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">rgw</span> <span class="n">realm</span> <span class="n">bootstrap</span> <span class="o">-</span><span class="n">i</span> <span class="n">spec</span><span class="o">.</span><span class="n">yaml</span>
</pre></div>
</div>
<p>Create a new realm + zonegroup + zone and deploy rgw daemons via the
orchestrator using the information specified in the YAML file.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">rgw</span> <span class="n">realm</span> <span class="n">tokens</span>
</pre></div>
</div>
<p>List the tokens of all the available realms</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">rgw</span> <span class="n">zone</span> <span class="n">create</span> <span class="o">-</span><span class="n">i</span> <span class="n">spec</span><span class="o">.</span><span class="n">yaml</span>
</pre></div>
</div>
<p>Join an existing realm by creating a new secondary zone (using the realm token)</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span> <span class="n">rgw</span> <span class="n">admin</span> <span class="p">[</span><span class="o">*</span><span class="p">]</span>
</pre></div>
</div>
<p>RGW admin command</p>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../rook/" class="btn btn-neutral float-left" title="Rook" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../mds_autoscaler/" class="btn btn-neutral float-right" title="MDS Autoscaler Module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>